package routers

import (
	"beego-demo/controllers"
	"github.com/astaxie/beego"
)

func init() {
    beego.Router("/", &controllers.MainController{})
    beego.Router("/goods", &controllers.GoodsController{})

    beego.Router("/article", &controllers.ArticleController{}, "get:Index")
    beego.Router("/article/index", &controllers.ArticleController{}, "get:Index")
    beego.Router("/article/create", &controllers.ArticleController{}, "get:Create")
    beego.Router("/article/store", &controllers.ArticleController{}, "post:Store")
    beego.Router("/article/show", &controllers.ArticleController{}, "get:Show")
    beego.Router("/article/edit", &controllers.ArticleController{}, "get:Edit")
    beego.Router("/article/update", &controllers.ArticleController{}, "post:Update")
    beego.Router("/article/destroy", &controllers.ArticleController{}, "post:Destroy")

    beego.Router("/user", &controllers.UserController{}, "get:Index")
    beego.Router("/user/index", &controllers.UserController{}, "get:Index")
    beego.Router("/user/create", &controllers.UserController{}, "get:Create")
    beego.Router("/user/store", &controllers.UserController{}, "post:Store")
}
